-----------------------------------------
-- ID: 5148
-- Item: plate_of_squid_sushi
-- Food Effect: 30Min, All Races
-----------------------------------------
-- Health 30
-- Dexterity 6
-- Agility 5
-- Mind -1
-- Accuracy % 15
-- Ranged ACC % 15
-- Sleep Resist 1
-----------------------------------------
require("scripts/globals/status");
-----------------------------------------

function onItemCheck(target)
    local result = 0;
    if (target:hasStatusEffect(dsp.effect.FOOD) == true or target:hasStatusEffect(dsp.effect.FIELD_SUPPORT_FOOD) == true) then
        result = 246;
    end
    return result;
end;

function onItemUse(target)
    target:addStatusEffect(dsp.effect.FOOD,0,0,1800,5148);
end;

function onEffectGain(target, effect)
    target:addMod(dsp.mod.HP, 30);
    target:addMod(dsp.mod.DEX, 6);
    target:addMod(dsp.mod.AGI, 5);
    target:addMod(dsp.mod.MND, -1);
    target:addMod(dsp.mod.FOOD_ACCP, 15);
    target:addMod(dsp.mod.FOOD_ACC_CAP, 72);
    target:addMod(dsp.mod.FOOD_RACCP, 15);
    target:addMod(dsp.mod.FOOD_RACC_CAP, 72);
    target:addMod(dsp.mod.SLEEPRES, 1);
end;

function onEffectLose(target, effect)
    target:delMod(dsp.mod.HP, 30);
    target:delMod(dsp.mod.DEX, 6);
    target:delMod(dsp.mod.AGI, 5);
    target:delMod(dsp.mod.MND, -1);
    target:delMod(dsp.mod.FOOD_ACCP, 15);
    target:delMod(dsp.mod.FOOD_ACC_CAP, 72);
    target:delMod(dsp.mod.FOOD_RACCP, 15);
    target:delMod(dsp.mod.FOOD_RACC_CAP, 72);
    target:delMod(dsp.mod.SLEEPRES, 1);
end;
